package com.gxy.learn.design.model.construction.decorator;

import lombok.extern.slf4j.Slf4j;

/**
 * @description: 装饰者测试
 * @author: gaoxueyong
 * @Date: 2022/11/7 19:32
 */
@Slf4j
public class Client {
    public static void main(String[] args) {
        FastFood fastFood = new FiredRice();
        log.info("{} {} 元",fastFood.getDesc(),fastFood.cost());
        log.info("=====炒饭里加鸡蛋=====");
         fastFood =  new Egg(fastFood);
        log.info("{} {} 元",fastFood.getDesc(),fastFood.cost());

        log.info("=====炒饭里加鸡蛋=====");
        fastFood =  new Egg(fastFood);
        log.info("{} {} 元",fastFood.getDesc(),fastFood.cost());
        log.info("=====炒饭里加培根=====");
        fastFood =  new Bacon(fastFood);
        log.info("{} {} 元",fastFood.getDesc(),fastFood.cost());

    }
}
